package com.starblink.android.guang.route

import android.content.Context
import com.alibaba.android.arouter.facade.Postcard
import com.alibaba.android.arouter.facade.annotation.Interceptor
import com.alibaba.android.arouter.facade.callback.InterceptorCallback
import com.alibaba.android.arouter.facade.template.IInterceptor
import com.starblink.basic.route.RoutePage

/**
 *  Create by yuanl at 2023/4/26
 **/
@Interceptor(priority = 90, name = "GuangProductIntercept")
class ProductLinkIntercept : IInterceptor {

    private var appContext: Context? = null

    private var loginPostCard: Postcard? = null

    override fun init(context: Context?) {
        this.appContext = context
    }

    override fun process(postcard: Postcard?, callback: InterceptorCallback?) {
//         Log.d("ProductLinkIntercept", "process:  $postcard")
        //访问商品外链时上报接口
        if (postcard != null) {
            if (postcard.path == RoutePage.Product.PAGE_LINK) {//TODO
//                PointReportUtils.report(PointReportUtils.getProductLinkReportData())
            }
        }
        callback?.onContinue(postcard)

    }

    private companion object {
    }

}